package com.hewep.kit;

import java.util.List;
import java.util.Map;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class Gsonkit {
	
	private static Gson gson = new Gson();

	public static Map<String, String> getMap(String value) {
		return gson.fromJson(value, new TypeToken<Map<String, String>>(){}.getType());
	}
	
	public static Map<String, Object> getMapObj(String value) {
		return gson.fromJson(value, new TypeToken<Map<String, Object>>(){}.getType());
	}
	
	public static List<Map<String, Object>> getListMap(String value) {
		return gson.fromJson(value, new TypeToken<List<Map<String, Object>>>(){}.getType());
	}
	
	public static List<Object> getList(String value) {
		return gson.fromJson(value, new TypeToken<List<Object>>(){}.getType());
	}
	
	public static List<String> getListStr(String value) {
		return gson.fromJson(value, new TypeToken<List<Object>>(){}.getType());
	}
}
